//
//  SubjectItemCell.m
//  JiaoX
//
//  Created by 尹桥印 on 14/11/12.
//  Copyright (c) 2014年 北京娇羞科技有限公司. All rights reserved.
//

#import "SubjectItemCell.h"
#import "SubjectItemView.h"

@interface SubjectItemCell()
@property (nonatomic, weak) SubjectItemView *subjectView;
@end

@implementation SubjectItemCell


+ (instancetype)cellWithTableView:(UITableView *)tableView
{
    static NSString *ID = @"subjectItem";
    SubjectItemCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
    if (!cell) {
        cell = [[SubjectItemCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:ID];
    }
    return cell;
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        SubjectItemView *subjectView =  [[SubjectItemView alloc]init];
        self.subjectView = subjectView;
        [self addSubview:subjectView];
        
    }
    return self;
}

-(void)setSubjectFrame:(SubjectViewFrame *)subjectFrame{
    _subjectFrame = subjectFrame;
    _subjectView.subjectFrame = subjectFrame;
}

@end
